package com.hanggold.jfinal.controller;

import com.hanggold.jfinal.interceptor.ThreeDemoInterceptor;
import com.jfinal.aop.Before;
import com.jfinal.core.Controller;
import com.jfinal.core.Path;
import lombok.extern.slf4j.Slf4j;

@Path("demo")
@Slf4j
@Before(ThreeDemoInterceptor.class)
public class DemoController extends Controller {

    public void index(){
        log.info("my first demo program");
        render("demo.html");
    }

    
    public void temp(){
        log.info("this is template");
        set("username","helloEnjoy");
        set("flag",true);
        set("title","测试模板");
        renderTemplate("temp.html");
    }
    
    
    public void custom(){
        log.info("this custom template ");
        render("custom.html");
    }
}
